/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package doan.quanlycanbo.portlet.service;

import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.model.BaseModel;

import doan.quanlycanbo.portlet.model.capuyClp;
import doan.quanlycanbo.portlet.model.chucvuClp;
import doan.quanlycanbo.portlet.model.danhhieuClp;
import doan.quanlycanbo.portlet.model.dantocClp;
import doan.quanlycanbo.portlet.model.dienbienhochamClp;
import doan.quanlycanbo.portlet.model.dienbienhocviClp;
import doan.quanlycanbo.portlet.model.dienbienluongClp;
import doan.quanlycanbo.portlet.model.donviClp;
import doan.quanlycanbo.portlet.model.giaoducphothongClp;
import doan.quanlycanbo.portlet.model.hesoluongClp;
import doan.quanlycanbo.portlet.model.hochamClp;
import doan.quanlycanbo.portlet.model.hocviClp;
import doan.quanlycanbo.portlet.model.hosoClp;
import doan.quanlycanbo.portlet.model.khoidonviquanlyClp;
import doan.quanlycanbo.portlet.model.ngachluongClp;
import doan.quanlycanbo.portlet.model.quatrinhdinuocngoaiClp;
import doan.quanlycanbo.portlet.model.quatrinhnghiencuuClp;
import doan.quanlycanbo.portlet.model.sachxuatbanClp;
import doan.quanlycanbo.portlet.model.tongiaoClp;
import doan.quanlycanbo.portlet.model.xuatthanClp;

import java.lang.reflect.Method;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author Brian Wing Shun Chan
 */
public class ClpSerializer {
	public static final String SERVLET_CONTEXT_NAME = "QuanLyCanBo-portlet";

	public static void setClassLoader(ClassLoader classLoader) {
		_classLoader = classLoader;
	}

	public static Object translateInput(BaseModel<?> oldModel) {
		Class<?> oldModelClass = oldModel.getClass();

		String oldModelClassName = oldModelClass.getName();

		if (oldModelClassName.equals(khoidonviquanlyClp.class.getName())) {
			khoidonviquanlyClp oldCplModel = (khoidonviquanlyClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.khoidonviquanlyImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMakhoi",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMakhoi());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTenkhoi",
							new Class[] { String.class });

					String value4 = oldCplModel.getTenkhoi();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(donviClp.class.getName())) {
			donviClp oldCplModel = (donviClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.donviImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMadonvi",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMadonvi());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMakhoi",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMakhoi());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setDonvicha",
							new Class[] { Long.TYPE });

					Long value5 = new Long(oldCplModel.getDonvicha());

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setOrgId",
							new Class[] { Long.TYPE });

					Long value6 = new Long(oldCplModel.getOrgId());

					method6.invoke(newModel, value6);

					Method method7 = newModelClass.getMethod("setTendonvi",
							new Class[] { String.class });

					String value7 = oldCplModel.getTendonvi();

					method7.invoke(newModel, value7);

					Method method8 = newModelClass.getMethod("setDiachi",
							new Class[] { String.class });

					String value8 = oldCplModel.getDiachi();

					method8.invoke(newModel, value8);

					Method method9 = newModelClass.getMethod("setDienthoai",
							new Class[] { String.class });

					String value9 = oldCplModel.getDienthoai();

					method9.invoke(newModel, value9);

					Method method10 = newModelClass.getMethod("setFax",
							new Class[] { String.class });

					String value10 = oldCplModel.getFax();

					method10.invoke(newModel, value10);

					Method method11 = newModelClass.getMethod("setEmail",
							new Class[] { String.class });

					String value11 = oldCplModel.getEmail();

					method11.invoke(newModel, value11);

					Method method12 = newModelClass.getMethod("setWebsite",
							new Class[] { String.class });

					String value12 = oldCplModel.getWebsite();

					method12.invoke(newModel, value12);

					Method method13 = newModelClass.getMethod("setHinhanh",
							new Class[] { String.class });

					String value13 = oldCplModel.getHinhanh();

					method13.invoke(newModel, value13);

					Method method14 = newModelClass.getMethod("setGioithieuchung",
							new Class[] { String.class });

					String value14 = oldCplModel.getGioithieuchung();

					method14.invoke(newModel, value14);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(chucvuClp.class.getName())) {
			chucvuClp oldCplModel = (chucvuClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.chucvuImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMachucvu",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMachucvu());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTenchucvu",
							new Class[] { String.class });

					String value4 = oldCplModel.getTenchucvu();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(capuyClp.class.getName())) {
			capuyClp oldCplModel = (capuyClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.capuyImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMacapuy",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMacapuy());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTencapuy",
							new Class[] { String.class });

					String value4 = oldCplModel.getTencapuy();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(danhhieuClp.class.getName())) {
			danhhieuClp oldCplModel = (danhhieuClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.danhhieuImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMadanhhieu",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMadanhhieu());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTendanhhieu",
							new Class[] { String.class });

					String value4 = oldCplModel.getTendanhhieu();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(dantocClp.class.getName())) {
			dantocClp oldCplModel = (dantocClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.dantocImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMadantoc",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMadantoc());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTendantoc",
							new Class[] { String.class });

					String value4 = oldCplModel.getTendantoc();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(hochamClp.class.getName())) {
			hochamClp oldCplModel = (hochamClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.hochamImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMahocham",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMahocham());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTenhocham",
							new Class[] { String.class });

					String value4 = oldCplModel.getTenhocham();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(hocviClp.class.getName())) {
			hocviClp oldCplModel = (hocviClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.hocviImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMahocvi",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMahocvi());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTenhocvi",
							new Class[] { String.class });

					String value4 = oldCplModel.getTenhocvi();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(tongiaoClp.class.getName())) {
			tongiaoClp oldCplModel = (tongiaoClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.tongiaoImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMatongiao",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMatongiao());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTentongiao",
							new Class[] { String.class });

					String value4 = oldCplModel.getTentongiao();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(xuatthanClp.class.getName())) {
			xuatthanClp oldCplModel = (xuatthanClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.xuatthanImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMaxuatthan",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMaxuatthan());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTenxuatthan",
							new Class[] { String.class });

					String value4 = oldCplModel.getTenxuatthan();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(giaoducphothongClp.class.getName())) {
			giaoducphothongClp oldCplModel = (giaoducphothongClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.giaoducphothongImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMagdpt",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMagdpt());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setTengdpt",
							new Class[] { String.class });

					String value4 = oldCplModel.getTengdpt();

					method4.invoke(newModel, value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(ngachluongClp.class.getName())) {
			ngachluongClp oldCplModel = (ngachluongClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.ngachluongImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMabangngachluong",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMabangngachluong());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMangachluong",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMangachluong());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setTenngachluong",
							new Class[] { String.class });

					String value5 = oldCplModel.getTenngachluong();

					method5.invoke(newModel, value5);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(hesoluongClp.class.getName())) {
			hesoluongClp oldCplModel = (hesoluongClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.hesoluongImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMahesoluong",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMahesoluong());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMangachluong",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMangachluong());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setBacluong",
							new Class[] { Double.TYPE });

					Double value5 = new Double(oldCplModel.getBacluong());

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setHesoluong",
							new Class[] { Double.TYPE });

					Double value6 = new Double(oldCplModel.getHesoluong());

					method6.invoke(newModel, value6);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(hosoClp.class.getName())) {
			hosoClp oldCplModel = (hosoClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.hosoImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMahoso",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMahoso());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setUserId",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getUserId());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setSohieunhanvien",
							new Class[] { Long.TYPE });

					Long value5 = new Long(oldCplModel.getSohieunhanvien());

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setCmtnd",
							new Class[] { String.class });

					String value6 = oldCplModel.getCmtnd();

					method6.invoke(newModel, value6);

					Method method7 = newModelClass.getMethod("setHoten",
							new Class[] { String.class });

					String value7 = oldCplModel.getHoten();

					method7.invoke(newModel, value7);

					Method method8 = newModelClass.getMethod("setGioitinh",
							new Class[] { String.class });

					String value8 = oldCplModel.getGioitinh();

					method8.invoke(newModel, value8);

					Method method9 = newModelClass.getMethod("setDuongdananh",
							new Class[] { String.class });

					String value9 = oldCplModel.getDuongdananh();

					method9.invoke(newModel, value9);

					Method method10 = newModelClass.getMethod("setTenthuongdung",
							new Class[] { String.class });

					String value10 = oldCplModel.getTenthuongdung();

					method10.invoke(newModel, value10);

					Method method11 = newModelClass.getMethod("setNgaysinh",
							new Class[] { Date.class });

					Date value11 = oldCplModel.getNgaysinh();

					method11.invoke(newModel, value11);

					Method method12 = newModelClass.getMethod("setNoisinh",
							new Class[] { String.class });

					String value12 = oldCplModel.getNoisinh();

					method12.invoke(newModel, value12);

					Method method13 = newModelClass.getMethod("setQuequan",
							new Class[] { String.class });

					String value13 = oldCplModel.getQuequan();

					method13.invoke(newModel, value13);

					Method method14 = newModelClass.getMethod("setDiachithuongtru",
							new Class[] { String.class });

					String value14 = oldCplModel.getDiachithuongtru();

					method14.invoke(newModel, value14);

					Method method15 = newModelClass.getMethod("setDiachitamtru",
							new Class[] { String.class });

					String value15 = oldCplModel.getDiachitamtru();

					method15.invoke(newModel, value15);

					Method method16 = newModelClass.getMethod("setDienthoai",
							new Class[] { String.class });

					String value16 = oldCplModel.getDienthoai();

					method16.invoke(newModel, value16);

					Method method17 = newModelClass.getMethod("setEmail",
							new Class[] { String.class });

					String value17 = oldCplModel.getEmail();

					method17.invoke(newModel, value17);

					Method method18 = newModelClass.getMethod("setQuocgia",
							new Class[] { String.class });

					String value18 = oldCplModel.getQuocgia();

					method18.invoke(newModel, value18);

					Method method19 = newModelClass.getMethod("setNgayvaodang",
							new Class[] { Date.class });

					Date value19 = oldCplModel.getNgayvaodang();

					method19.invoke(newModel, value19);

					Method method20 = newModelClass.getMethod("setChuyennganh1",
							new Class[] { String.class });

					String value20 = oldCplModel.getChuyennganh1();

					method20.invoke(newModel, value20);

					Method method21 = newModelClass.getMethod("setNamtncn1",
							new Class[] { Integer.TYPE });

					Integer value21 = new Integer(oldCplModel.getNamtncn1());

					method21.invoke(newModel, value21);

					Method method22 = newModelClass.getMethod("setChuyennganh2",
							new Class[] { String.class });

					String value22 = oldCplModel.getChuyennganh2();

					method22.invoke(newModel, value22);

					Method method23 = newModelClass.getMethod("setNamtncn2",
							new Class[] { Integer.TYPE });

					Integer value23 = new Integer(oldCplModel.getNamtncn2());

					method23.invoke(newModel, value23);

					Method method24 = newModelClass.getMethod("setChuyennganh3",
							new Class[] { String.class });

					String value24 = oldCplModel.getChuyennganh3();

					method24.invoke(newModel, value24);

					Method method25 = newModelClass.getMethod("setNamtncn3",
							new Class[] { Integer.TYPE });

					Integer value25 = new Integer(oldCplModel.getNamtncn3());

					method25.invoke(newModel, value25);

					Method method26 = newModelClass.getMethod("setMadonvi",
							new Class[] { Long.TYPE });

					Long value26 = new Long(oldCplModel.getMadonvi());

					method26.invoke(newModel, value26);

					Method method27 = newModelClass.getMethod("setMachucvu",
							new Class[] { Long.TYPE });

					Long value27 = new Long(oldCplModel.getMachucvu());

					method27.invoke(newModel, value27);

					Method method28 = newModelClass.getMethod("setMadantoc",
							new Class[] { Long.TYPE });

					Long value28 = new Long(oldCplModel.getMadantoc());

					method28.invoke(newModel, value28);

					Method method29 = newModelClass.getMethod("setMahocham",
							new Class[] { Long.TYPE });

					Long value29 = new Long(oldCplModel.getMahocham());

					method29.invoke(newModel, value29);

					Method method30 = newModelClass.getMethod("setMahocvi",
							new Class[] { Long.TYPE });

					Long value30 = new Long(oldCplModel.getMahocvi());

					method30.invoke(newModel, value30);

					Method method31 = newModelClass.getMethod("setMahesoluong",
							new Class[] { Long.TYPE });

					Long value31 = new Long(oldCplModel.getMahesoluong());

					method31.invoke(newModel, value31);

					Method method32 = newModelClass.getMethod("setMacapuy",
							new Class[] { Long.TYPE });

					Long value32 = new Long(oldCplModel.getMacapuy());

					method32.invoke(newModel, value32);

					Method method33 = newModelClass.getMethod("setMatongiao",
							new Class[] { Long.TYPE });

					Long value33 = new Long(oldCplModel.getMatongiao());

					method33.invoke(newModel, value33);

					Method method34 = newModelClass.getMethod("setMaxuatthan",
							new Class[] { Long.TYPE });

					Long value34 = new Long(oldCplModel.getMaxuatthan());

					method34.invoke(newModel, value34);

					Method method35 = newModelClass.getMethod("setMagdpt",
							new Class[] { Long.TYPE });

					Long value35 = new Long(oldCplModel.getMagdpt());

					method35.invoke(newModel, value35);

					Method method36 = newModelClass.getMethod("setMadanhhieu",
							new Class[] { Long.TYPE });

					Long value36 = new Long(oldCplModel.getMadanhhieu());

					method36.invoke(newModel, value36);

					Method method37 = newModelClass.getMethod("setCotendangnhap",
							new Class[] { Boolean.TYPE });

					Boolean value37 = new Boolean(oldCplModel.getCotendangnhap());

					method37.invoke(newModel, value37);

					Method method38 = newModelClass.getMethod("setVitri",
							new Class[] { Integer.TYPE });

					Integer value38 = new Integer(oldCplModel.getVitri());

					method38.invoke(newModel, value38);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(sachxuatbanClp.class.getName())) {
			sachxuatbanClp oldCplModel = (sachxuatbanClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.sachxuatbanImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMasxb",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMasxb());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMahoso",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMahoso());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setTensach",
							new Class[] { String.class });

					String value5 = oldCplModel.getTensach();

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setNamxb",
							new Class[] { Integer.TYPE });

					Integer value6 = new Integer(oldCplModel.getNamxb());

					method6.invoke(newModel, value6);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(dienbienhochamClp.class.getName())) {
			dienbienhochamClp oldCplModel = (dienbienhochamClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.dienbienhochamImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMadienbienhh",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMadienbienhh());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMahoso",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMahoso());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setMahocham",
							new Class[] { Long.TYPE });

					Long value5 = new Long(oldCplModel.getMahocham());

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setChuyennganh",
							new Class[] { String.class });

					String value6 = oldCplModel.getChuyennganh();

					method6.invoke(newModel, value6);

					Method method7 = newModelClass.getMethod("setNamphong",
							new Class[] { Integer.TYPE });

					Integer value7 = new Integer(oldCplModel.getNamphong());

					method7.invoke(newModel, value7);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(dienbienhocviClp.class.getName())) {
			dienbienhocviClp oldCplModel = (dienbienhocviClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.dienbienhocviImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMadienbienhv",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMadienbienhv());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMahoso",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMahoso());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setMahocvi",
							new Class[] { Long.TYPE });

					Long value5 = new Long(oldCplModel.getMahocvi());

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setChuyennganh",
							new Class[] { String.class });

					String value6 = oldCplModel.getChuyennganh();

					method6.invoke(newModel, value6);

					Method method7 = newModelClass.getMethod("setNamphong",
							new Class[] { Integer.TYPE });

					Integer value7 = new Integer(oldCplModel.getNamphong());

					method7.invoke(newModel, value7);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(dienbienluongClp.class.getName())) {
			dienbienluongClp oldCplModel = (dienbienluongClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.dienbienluongImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMadienbienluong",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMadienbienluong());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMahoso",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMahoso());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setMahesoluong",
							new Class[] { Long.TYPE });

					Long value5 = new Long(oldCplModel.getMahesoluong());

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setTungay",
							new Class[] { Date.class });

					Date value6 = oldCplModel.getTungay();

					method6.invoke(newModel, value6);

					Method method7 = newModelClass.getMethod("setDenngay",
							new Class[] { Date.class });

					Date value7 = oldCplModel.getDenngay();

					method7.invoke(newModel, value7);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(quatrinhdinuocngoaiClp.class.getName())) {
			quatrinhdinuocngoaiClp oldCplModel = (quatrinhdinuocngoaiClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.quatrinhdinuocngoaiImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMaquatrinhdnn",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMaquatrinhdnn());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMahoso",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMahoso());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setTungay",
							new Class[] { Date.class });

					Date value5 = oldCplModel.getTungay();

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setDenngay",
							new Class[] { Date.class });

					Date value6 = oldCplModel.getDenngay();

					method6.invoke(newModel, value6);

					Method method7 = newModelClass.getMethod("setQuocgia",
							new Class[] { String.class });

					String value7 = oldCplModel.getQuocgia();

					method7.invoke(newModel, value7);

					Method method8 = newModelClass.getMethod("setMucdich",
							new Class[] { String.class });

					String value8 = oldCplModel.getMucdich();

					method8.invoke(newModel, value8);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(quatrinhnghiencuuClp.class.getName())) {
			quatrinhnghiencuuClp oldCplModel = (quatrinhnghiencuuClp)oldModel;

			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					Class<?> newModelClass = Class.forName("doan.quanlycanbo.portlet.model.impl.quatrinhnghiencuuImpl",
							true, _classLoader);

					Object newModel = newModelClass.newInstance();

					Method method0 = newModelClass.getMethod("setMaquatrinhnc",
							new Class[] { Long.TYPE });

					Long value0 = new Long(oldCplModel.getMaquatrinhnc());

					method0.invoke(newModel, value0);

					Method method1 = newModelClass.getMethod("setGroupId",
							new Class[] { Long.TYPE });

					Long value1 = new Long(oldCplModel.getGroupId());

					method1.invoke(newModel, value1);

					Method method2 = newModelClass.getMethod("setCompanyId",
							new Class[] { Long.TYPE });

					Long value2 = new Long(oldCplModel.getCompanyId());

					method2.invoke(newModel, value2);

					Method method3 = newModelClass.getMethod("setLanguageId",
							new Class[] { String.class });

					String value3 = oldCplModel.getLanguageId();

					method3.invoke(newModel, value3);

					Method method4 = newModelClass.getMethod("setMahoso",
							new Class[] { Long.TYPE });

					Long value4 = new Long(oldCplModel.getMahoso());

					method4.invoke(newModel, value4);

					Method method5 = newModelClass.getMethod("setTungay",
							new Class[] { Date.class });

					Date value5 = oldCplModel.getTungay();

					method5.invoke(newModel, value5);

					Method method6 = newModelClass.getMethod("setDenngay",
							new Class[] { Date.class });

					Date value6 = oldCplModel.getDenngay();

					method6.invoke(newModel, value6);

					Method method7 = newModelClass.getMethod("setTendetai",
							new Class[] { String.class });

					String value7 = oldCplModel.getTendetai();

					method7.invoke(newModel, value7);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		return oldModel;
	}

	public static Object translateInput(List<Object> oldList) {
		List<Object> newList = new ArrayList<Object>(oldList.size());

		for (int i = 0; i < oldList.size(); i++) {
			Object curObj = oldList.get(i);

			newList.add(translateInput(curObj));
		}

		return newList;
	}

	public static Object translateInput(Object obj) {
		if (obj instanceof BaseModel<?>) {
			return translateInput((BaseModel<?>)obj);
		}
		else if (obj instanceof List<?>) {
			return translateInput((List<Object>)obj);
		}
		else {
			return obj;
		}
	}

	public static Object translateOutput(BaseModel<?> oldModel) {
		Class<?> oldModelClass = oldModel.getClass();

		String oldModelClassName = oldModelClass.getName();

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.khoidonviquanlyImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					khoidonviquanlyClp newModel = new khoidonviquanlyClp();

					Method method0 = oldModelClass.getMethod("getMakhoi");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMakhoi(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTenkhoi");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTenkhoi(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.donviImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					donviClp newModel = new donviClp();

					Method method0 = oldModelClass.getMethod("getMadonvi");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMadonvi(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMakhoi");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMakhoi(value4);

					Method method5 = oldModelClass.getMethod("getDonvicha");

					Long value5 = (Long)method5.invoke(oldModel, (Object[])null);

					newModel.setDonvicha(value5);

					Method method6 = oldModelClass.getMethod("getOrgId");

					Long value6 = (Long)method6.invoke(oldModel, (Object[])null);

					newModel.setOrgId(value6);

					Method method7 = oldModelClass.getMethod("getTendonvi");

					String value7 = (String)method7.invoke(oldModel,
							(Object[])null);

					newModel.setTendonvi(value7);

					Method method8 = oldModelClass.getMethod("getDiachi");

					String value8 = (String)method8.invoke(oldModel,
							(Object[])null);

					newModel.setDiachi(value8);

					Method method9 = oldModelClass.getMethod("getDienthoai");

					String value9 = (String)method9.invoke(oldModel,
							(Object[])null);

					newModel.setDienthoai(value9);

					Method method10 = oldModelClass.getMethod("getFax");

					String value10 = (String)method10.invoke(oldModel,
							(Object[])null);

					newModel.setFax(value10);

					Method method11 = oldModelClass.getMethod("getEmail");

					String value11 = (String)method11.invoke(oldModel,
							(Object[])null);

					newModel.setEmail(value11);

					Method method12 = oldModelClass.getMethod("getWebsite");

					String value12 = (String)method12.invoke(oldModel,
							(Object[])null);

					newModel.setWebsite(value12);

					Method method13 = oldModelClass.getMethod("getHinhanh");

					String value13 = (String)method13.invoke(oldModel,
							(Object[])null);

					newModel.setHinhanh(value13);

					Method method14 = oldModelClass.getMethod(
							"getGioithieuchung");

					String value14 = (String)method14.invoke(oldModel,
							(Object[])null);

					newModel.setGioithieuchung(value14);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.chucvuImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					chucvuClp newModel = new chucvuClp();

					Method method0 = oldModelClass.getMethod("getMachucvu");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMachucvu(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTenchucvu");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTenchucvu(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.capuyImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					capuyClp newModel = new capuyClp();

					Method method0 = oldModelClass.getMethod("getMacapuy");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMacapuy(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTencapuy");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTencapuy(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.danhhieuImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					danhhieuClp newModel = new danhhieuClp();

					Method method0 = oldModelClass.getMethod("getMadanhhieu");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMadanhhieu(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTendanhhieu");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTendanhhieu(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.dantocImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					dantocClp newModel = new dantocClp();

					Method method0 = oldModelClass.getMethod("getMadantoc");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMadantoc(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTendantoc");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTendantoc(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.hochamImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					hochamClp newModel = new hochamClp();

					Method method0 = oldModelClass.getMethod("getMahocham");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMahocham(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTenhocham");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTenhocham(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.hocviImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					hocviClp newModel = new hocviClp();

					Method method0 = oldModelClass.getMethod("getMahocvi");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMahocvi(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTenhocvi");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTenhocvi(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.tongiaoImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					tongiaoClp newModel = new tongiaoClp();

					Method method0 = oldModelClass.getMethod("getMatongiao");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMatongiao(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTentongiao");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTentongiao(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.xuatthanImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					xuatthanClp newModel = new xuatthanClp();

					Method method0 = oldModelClass.getMethod("getMaxuatthan");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMaxuatthan(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTenxuatthan");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTenxuatthan(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.giaoducphothongImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					giaoducphothongClp newModel = new giaoducphothongClp();

					Method method0 = oldModelClass.getMethod("getMagdpt");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMagdpt(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getTengdpt");

					String value4 = (String)method4.invoke(oldModel,
							(Object[])null);

					newModel.setTengdpt(value4);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.ngachluongImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					ngachluongClp newModel = new ngachluongClp();

					Method method0 = oldModelClass.getMethod(
							"getMabangngachluong");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMabangngachluong(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMangachluong");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMangachluong(value4);

					Method method5 = oldModelClass.getMethod("getTenngachluong");

					String value5 = (String)method5.invoke(oldModel,
							(Object[])null);

					newModel.setTenngachluong(value5);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.hesoluongImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					hesoluongClp newModel = new hesoluongClp();

					Method method0 = oldModelClass.getMethod("getMahesoluong");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMahesoluong(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMangachluong");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMangachluong(value4);

					Method method5 = oldModelClass.getMethod("getBacluong");

					Double value5 = (Double)method5.invoke(oldModel,
							(Object[])null);

					newModel.setBacluong(value5);

					Method method6 = oldModelClass.getMethod("getHesoluong");

					Double value6 = (Double)method6.invoke(oldModel,
							(Object[])null);

					newModel.setHesoluong(value6);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.hosoImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					hosoClp newModel = new hosoClp();

					Method method0 = oldModelClass.getMethod("getMahoso");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMahoso(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getUserId");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setUserId(value4);

					Method method5 = oldModelClass.getMethod(
							"getSohieunhanvien");

					Long value5 = (Long)method5.invoke(oldModel, (Object[])null);

					newModel.setSohieunhanvien(value5);

					Method method6 = oldModelClass.getMethod("getCmtnd");

					String value6 = (String)method6.invoke(oldModel,
							(Object[])null);

					newModel.setCmtnd(value6);

					Method method7 = oldModelClass.getMethod("getHoten");

					String value7 = (String)method7.invoke(oldModel,
							(Object[])null);

					newModel.setHoten(value7);

					Method method8 = oldModelClass.getMethod("getGioitinh");

					String value8 = (String)method8.invoke(oldModel,
							(Object[])null);

					newModel.setGioitinh(value8);

					Method method9 = oldModelClass.getMethod("getDuongdananh");

					String value9 = (String)method9.invoke(oldModel,
							(Object[])null);

					newModel.setDuongdananh(value9);

					Method method10 = oldModelClass.getMethod(
							"getTenthuongdung");

					String value10 = (String)method10.invoke(oldModel,
							(Object[])null);

					newModel.setTenthuongdung(value10);

					Method method11 = oldModelClass.getMethod("getNgaysinh");

					Date value11 = (Date)method11.invoke(oldModel,
							(Object[])null);

					newModel.setNgaysinh(value11);

					Method method12 = oldModelClass.getMethod("getNoisinh");

					String value12 = (String)method12.invoke(oldModel,
							(Object[])null);

					newModel.setNoisinh(value12);

					Method method13 = oldModelClass.getMethod("getQuequan");

					String value13 = (String)method13.invoke(oldModel,
							(Object[])null);

					newModel.setQuequan(value13);

					Method method14 = oldModelClass.getMethod(
							"getDiachithuongtru");

					String value14 = (String)method14.invoke(oldModel,
							(Object[])null);

					newModel.setDiachithuongtru(value14);

					Method method15 = oldModelClass.getMethod("getDiachitamtru");

					String value15 = (String)method15.invoke(oldModel,
							(Object[])null);

					newModel.setDiachitamtru(value15);

					Method method16 = oldModelClass.getMethod("getDienthoai");

					String value16 = (String)method16.invoke(oldModel,
							(Object[])null);

					newModel.setDienthoai(value16);

					Method method17 = oldModelClass.getMethod("getEmail");

					String value17 = (String)method17.invoke(oldModel,
							(Object[])null);

					newModel.setEmail(value17);

					Method method18 = oldModelClass.getMethod("getQuocgia");

					String value18 = (String)method18.invoke(oldModel,
							(Object[])null);

					newModel.setQuocgia(value18);

					Method method19 = oldModelClass.getMethod("getNgayvaodang");

					Date value19 = (Date)method19.invoke(oldModel,
							(Object[])null);

					newModel.setNgayvaodang(value19);

					Method method20 = oldModelClass.getMethod("getChuyennganh1");

					String value20 = (String)method20.invoke(oldModel,
							(Object[])null);

					newModel.setChuyennganh1(value20);

					Method method21 = oldModelClass.getMethod("getNamtncn1");

					Integer value21 = (Integer)method21.invoke(oldModel,
							(Object[])null);

					newModel.setNamtncn1(value21);

					Method method22 = oldModelClass.getMethod("getChuyennganh2");

					String value22 = (String)method22.invoke(oldModel,
							(Object[])null);

					newModel.setChuyennganh2(value22);

					Method method23 = oldModelClass.getMethod("getNamtncn2");

					Integer value23 = (Integer)method23.invoke(oldModel,
							(Object[])null);

					newModel.setNamtncn2(value23);

					Method method24 = oldModelClass.getMethod("getChuyennganh3");

					String value24 = (String)method24.invoke(oldModel,
							(Object[])null);

					newModel.setChuyennganh3(value24);

					Method method25 = oldModelClass.getMethod("getNamtncn3");

					Integer value25 = (Integer)method25.invoke(oldModel,
							(Object[])null);

					newModel.setNamtncn3(value25);

					Method method26 = oldModelClass.getMethod("getMadonvi");

					Long value26 = (Long)method26.invoke(oldModel,
							(Object[])null);

					newModel.setMadonvi(value26);

					Method method27 = oldModelClass.getMethod("getMachucvu");

					Long value27 = (Long)method27.invoke(oldModel,
							(Object[])null);

					newModel.setMachucvu(value27);

					Method method28 = oldModelClass.getMethod("getMadantoc");

					Long value28 = (Long)method28.invoke(oldModel,
							(Object[])null);

					newModel.setMadantoc(value28);

					Method method29 = oldModelClass.getMethod("getMahocham");

					Long value29 = (Long)method29.invoke(oldModel,
							(Object[])null);

					newModel.setMahocham(value29);

					Method method30 = oldModelClass.getMethod("getMahocvi");

					Long value30 = (Long)method30.invoke(oldModel,
							(Object[])null);

					newModel.setMahocvi(value30);

					Method method31 = oldModelClass.getMethod("getMahesoluong");

					Long value31 = (Long)method31.invoke(oldModel,
							(Object[])null);

					newModel.setMahesoluong(value31);

					Method method32 = oldModelClass.getMethod("getMacapuy");

					Long value32 = (Long)method32.invoke(oldModel,
							(Object[])null);

					newModel.setMacapuy(value32);

					Method method33 = oldModelClass.getMethod("getMatongiao");

					Long value33 = (Long)method33.invoke(oldModel,
							(Object[])null);

					newModel.setMatongiao(value33);

					Method method34 = oldModelClass.getMethod("getMaxuatthan");

					Long value34 = (Long)method34.invoke(oldModel,
							(Object[])null);

					newModel.setMaxuatthan(value34);

					Method method35 = oldModelClass.getMethod("getMagdpt");

					Long value35 = (Long)method35.invoke(oldModel,
							(Object[])null);

					newModel.setMagdpt(value35);

					Method method36 = oldModelClass.getMethod("getMadanhhieu");

					Long value36 = (Long)method36.invoke(oldModel,
							(Object[])null);

					newModel.setMadanhhieu(value36);

					Method method37 = oldModelClass.getMethod(
							"getCotendangnhap");

					Boolean value37 = (Boolean)method37.invoke(oldModel,
							(Object[])null);

					newModel.setCotendangnhap(value37);

					Method method38 = oldModelClass.getMethod("getVitri");

					Integer value38 = (Integer)method38.invoke(oldModel,
							(Object[])null);

					newModel.setVitri(value38);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.sachxuatbanImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					sachxuatbanClp newModel = new sachxuatbanClp();

					Method method0 = oldModelClass.getMethod("getMasxb");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMasxb(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMahoso");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMahoso(value4);

					Method method5 = oldModelClass.getMethod("getTensach");

					String value5 = (String)method5.invoke(oldModel,
							(Object[])null);

					newModel.setTensach(value5);

					Method method6 = oldModelClass.getMethod("getNamxb");

					Integer value6 = (Integer)method6.invoke(oldModel,
							(Object[])null);

					newModel.setNamxb(value6);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.dienbienhochamImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					dienbienhochamClp newModel = new dienbienhochamClp();

					Method method0 = oldModelClass.getMethod("getMadienbienhh");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMadienbienhh(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMahoso");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMahoso(value4);

					Method method5 = oldModelClass.getMethod("getMahocham");

					Long value5 = (Long)method5.invoke(oldModel, (Object[])null);

					newModel.setMahocham(value5);

					Method method6 = oldModelClass.getMethod("getChuyennganh");

					String value6 = (String)method6.invoke(oldModel,
							(Object[])null);

					newModel.setChuyennganh(value6);

					Method method7 = oldModelClass.getMethod("getNamphong");

					Integer value7 = (Integer)method7.invoke(oldModel,
							(Object[])null);

					newModel.setNamphong(value7);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.dienbienhocviImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					dienbienhocviClp newModel = new dienbienhocviClp();

					Method method0 = oldModelClass.getMethod("getMadienbienhv");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMadienbienhv(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMahoso");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMahoso(value4);

					Method method5 = oldModelClass.getMethod("getMahocvi");

					Long value5 = (Long)method5.invoke(oldModel, (Object[])null);

					newModel.setMahocvi(value5);

					Method method6 = oldModelClass.getMethod("getChuyennganh");

					String value6 = (String)method6.invoke(oldModel,
							(Object[])null);

					newModel.setChuyennganh(value6);

					Method method7 = oldModelClass.getMethod("getNamphong");

					Integer value7 = (Integer)method7.invoke(oldModel,
							(Object[])null);

					newModel.setNamphong(value7);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.dienbienluongImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					dienbienluongClp newModel = new dienbienluongClp();

					Method method0 = oldModelClass.getMethod(
							"getMadienbienluong");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMadienbienluong(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMahoso");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMahoso(value4);

					Method method5 = oldModelClass.getMethod("getMahesoluong");

					Long value5 = (Long)method5.invoke(oldModel, (Object[])null);

					newModel.setMahesoluong(value5);

					Method method6 = oldModelClass.getMethod("getTungay");

					Date value6 = (Date)method6.invoke(oldModel, (Object[])null);

					newModel.setTungay(value6);

					Method method7 = oldModelClass.getMethod("getDenngay");

					Date value7 = (Date)method7.invoke(oldModel, (Object[])null);

					newModel.setDenngay(value7);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.quatrinhdinuocngoaiImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					quatrinhdinuocngoaiClp newModel = new quatrinhdinuocngoaiClp();

					Method method0 = oldModelClass.getMethod("getMaquatrinhdnn");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMaquatrinhdnn(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMahoso");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMahoso(value4);

					Method method5 = oldModelClass.getMethod("getTungay");

					Date value5 = (Date)method5.invoke(oldModel, (Object[])null);

					newModel.setTungay(value5);

					Method method6 = oldModelClass.getMethod("getDenngay");

					Date value6 = (Date)method6.invoke(oldModel, (Object[])null);

					newModel.setDenngay(value6);

					Method method7 = oldModelClass.getMethod("getQuocgia");

					String value7 = (String)method7.invoke(oldModel,
							(Object[])null);

					newModel.setQuocgia(value7);

					Method method8 = oldModelClass.getMethod("getMucdich");

					String value8 = (String)method8.invoke(oldModel,
							(Object[])null);

					newModel.setMucdich(value8);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		if (oldModelClassName.equals(
					"doan.quanlycanbo.portlet.model.impl.quatrinhnghiencuuImpl")) {
			ClassLoader contextClassLoader = Thread.currentThread()
												   .getContextClassLoader();

			try {
				Thread.currentThread().setContextClassLoader(_classLoader);

				try {
					quatrinhnghiencuuClp newModel = new quatrinhnghiencuuClp();

					Method method0 = oldModelClass.getMethod("getMaquatrinhnc");

					Long value0 = (Long)method0.invoke(oldModel, (Object[])null);

					newModel.setMaquatrinhnc(value0);

					Method method1 = oldModelClass.getMethod("getGroupId");

					Long value1 = (Long)method1.invoke(oldModel, (Object[])null);

					newModel.setGroupId(value1);

					Method method2 = oldModelClass.getMethod("getCompanyId");

					Long value2 = (Long)method2.invoke(oldModel, (Object[])null);

					newModel.setCompanyId(value2);

					Method method3 = oldModelClass.getMethod("getLanguageId");

					String value3 = (String)method3.invoke(oldModel,
							(Object[])null);

					newModel.setLanguageId(value3);

					Method method4 = oldModelClass.getMethod("getMahoso");

					Long value4 = (Long)method4.invoke(oldModel, (Object[])null);

					newModel.setMahoso(value4);

					Method method5 = oldModelClass.getMethod("getTungay");

					Date value5 = (Date)method5.invoke(oldModel, (Object[])null);

					newModel.setTungay(value5);

					Method method6 = oldModelClass.getMethod("getDenngay");

					Date value6 = (Date)method6.invoke(oldModel, (Object[])null);

					newModel.setDenngay(value6);

					Method method7 = oldModelClass.getMethod("getTendetai");

					String value7 = (String)method7.invoke(oldModel,
							(Object[])null);

					newModel.setTendetai(value7);

					return newModel;
				}
				catch (Exception e) {
					_log.error(e, e);
				}
			}
			finally {
				Thread.currentThread().setContextClassLoader(contextClassLoader);
			}
		}

		return oldModel;
	}

	public static Object translateOutput(List<Object> oldList) {
		List<Object> newList = new ArrayList<Object>(oldList.size());

		for (int i = 0; i < oldList.size(); i++) {
			Object curObj = oldList.get(i);

			newList.add(translateOutput(curObj));
		}

		return newList;
	}

	public static Object translateOutput(Object obj) {
		if (obj instanceof BaseModel<?>) {
			return translateOutput((BaseModel<?>)obj);
		}
		else if (obj instanceof List<?>) {
			return translateOutput((List<Object>)obj);
		}
		else {
			return obj;
		}
	}

	private static Log _log = LogFactoryUtil.getLog(ClpSerializer.class);
	private static ClassLoader _classLoader;
}